from django.db import models

# Create your models here.
class Youhui(models.Model):
     name=models.CharField(max_length=30)
     start_time=models.DateField()
     end_time=models.DateField()
     price=models.IntegerField()
     count=models.IntegerField(default=1)

class User(models.Model):
    username=models.CharField(max_length=30)
    password=models.CharField(max_length=30)

class UserYouhui(models.Model):
    user=models.ForeignKey(User,on_delete=models.CASCADE)
    youhui=models.ForeignKey(Youhui,on_delete=models.CASCADE)

    uuid=models.CharField(max_length=150)
    start_time = models.DateField()
    end_time = models.DateField()
    price = models.IntegerField()

    name=models.CharField(max_length=30)


